<?php
include("inc/global.inc");
include("inc/fun.php");
$url="jobs.php";
$thepage=$_GET['page']?$_GET['page']:1;
$maxpage=20;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>职位搜索-三帝招聘网为您提供最新的招聘信息。</title>
<link href="css/body.css" rel="stylesheet" type="text/css"/>
<link href="css/link.css" rel="stylesheet" type="text/css"/>
<link href="css/head1.css" rel="stylesheet" type="text/css"/>
<link href="css/search1.css" rel="stylesheet" type="text/css"/>
<link href="css/foot.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="http://www.sandib2b.cn/js/job_class.js" charset="gb2312"></script>
<script language="javascript" src="http://www.sandib2b.cn/js/city.js" type="text/javascript" charset="gb2312"></script>
</head>
<body>
<?php include("inc/top.php"); ?>
<div class="menuBox1">
<a href="search.php">简单搜索</a>
<a href="advanced_search.php">高级搜索</a>
<div class="onl"></div>
</div>
<div id="mian" style="clear: both;margin-top: 20px;margin-bottom: 10px;" class="side" align="center">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<div id="mian">
  <div id="box">
  <div class="JobBox sideyellow backyellow">
    <div class="mian_Co">
      <div class="title size14 topside6"><strong>职位搜索</strong></div>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0" class="table">
        <form id="form1" name="form1" method="get" action="jobs.php" target="_blank">
          <tbody>
            <tr>
              <td width="15%" align="right">职位类别：</td>
              <td width="40%" align="left" style="padding-left:5px;"><select name="job_class" id="job_class" onChange="changejobtype(document.form1.job_class.options[document.form1.job_class.selectedIndex].value)" style="width:160px;">
                              <option value="">选择、修改</option>
							  <?php
							     $rs=@mysql_query("select * from job_class  where j_c_id=0");
								 while($row=@mysql_fetch_array($rs)){
							  ?><option value="<?=$row['id']?>"><?=$row[j_c_name]?></option>
							  <?php }?>
                          </select>&nbsp;<select name="job_smill" id="job_smill" style="width:160px;">
                              <option value="">选择、修改</option>
			    </select></td>
              <td width="45%" align="left" style="padding-left:5px;">工作地点：
                <select  name="c_provinces4" id="c_provinces4" onchange="changecity4(document.form1.c_provinces4.options[document.form1.c_provinces4.selectedIndex].value)">
                  <option value="">省份</option>
                  <?php
          $result = mysql_query("select * from city where city_id=0");    
          while($res = mysql_fetch_array($result)){    
          ?>
                  <option value="<?=$res['id']?>" <?php if($p_row[p_qw_pro_id]==$res[id]){echo "selected";}?>>
                    <?=$res['city_name']?>
                    </option>
                  <?php }?>
                </select>
                <select name="c_city4" id="c_city4" onchange="changecity5(document.form1.c_city4.options[document.form1.c_city4.selectedIndex].value)">
                  <option value="">城市</option>
                </select>
                <select name="c_diqu4" id="c_diqu4" style="width:75px;">
                  <option value="">地区</option>
                </select></td>
            </tr>
            <tr>
              <td align="right">行业类别：</td>
              <td style="padding-left:5px;"><select name="job_hy" id="job_hy" style="width:200px;">
                <option value="">选择、修改</option>
                <?php
							     $rs=@mysql_query("select * from job_hy where job_hy_id=0");
								 while($row=@mysql_fetch_array($rs)){
							  ?>
                <option value="<?=$row['id']?>">
                  <?=$row[job_hy_name]?>
                  </option>
                <?php }?>
              </select></td>
              <td style="padding-left:5px;">发布日期：
                <select name="job_date" style="width:200px;">
                  <option value="0">不限</option>
                  <option value="1">近1天</option>
                  <option value="3">近3天</option>
                  <option value="7">近7天</option>
                  <option value="15">近15天</option>
                  <option value="20">近20天</option>
                  <option value="30">近30天 </option>
                </select></td>
            </tr>
            <tr>
              <td align="right">工作性质：</td>
              <td colspan="2" style="padding-left:5px;">
		  <input id="job_nature" type="radio" checked="checked" value="1" name="p_nature" />全职
          <input id="job_nature" type="radio" value="2" name="p_nature" />兼职
          <input id="job_nature" type="radio" value="3" name="p_nature" />实习</td>
            </tr> 
            <tr>
              <td align="right">学历要求：</td>
              <td style="padding-left:5px;"><select name="job_edu" style="width:200px;">
            <option value="" >不限</option>
            <option value="2">高中及高中以下</option>
            <option value="5">专科</option>
            <option value="6">本科</option>
            <option value="7">硕士</option>
            <option value="8">博士及以上</option>
        </select></td>
              <td style="padding-left:5px;">工作经验：
                <select id="job_exp" name="job_exp" style="width:200px;">
                  <option value="" selected="selected">无</option>
                  <option value="2">1年以下</option>
                  <option value="3">1-2年</option>
                  <option value="4">3-5年</option>
                  <option value="5">6-7年</option>
                  <option value="6">8-10年</option>
                  <option value="7">10年以上</option>
                </select></td>
            </tr>
            <tr>
              <td align="right">月薪范围：</td>
              <td style="padding-left:5px;"><select id="job_salary" name="job_salary" style="width:200px;">
            <option value="">面谈</option>
            <option value="2">1000元/月以下</option>
            <option value="3">1000-2000元/月</option>
            <option value="4">2001-4000元/月</option>
            <option value="5">4001-6000元/月</option>
            <option value="6">6001-8000元/月</option>
            <option value="7">8001-10000元/月</option>
            <option value="8">10001-15000元/月</option>
            <option value="9">15000-25000元/月</option>
            <option value="10">25000元/月以上</option>
        </select></td>
              <td style="padding-left:5px;">性别要求：
                <select id="job_sex" name="job_sex" style="width:200px;">
                  <option value="" selected="selected">不限</option>
                  <option value="2">男</option>
                  <option value="3">女</option>
                </select></td>
            </tr> 
            <tr>
              <td align="right">关 键 字：</td>
              <td colspan="2" style="padding-left:5px;"><input type="text" name="keyword" style="width:200px;" onfocus="this.value=''" value="输入公司/职位关键字" /></td>
              </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td colspan="2" style="padding-left:5px;"><input name="submit" type="submit" value=" 搜 索 " /></td>
            </tr>
          </tbody>
        </form>
      </table>
    </div>
  </div>
  <div class="JobBox sideyellow topside6">

<div class="mian_Co">
  <div class="title size14 topside6"><strong>搜索结果</strong></div>
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFF5EC" class="table">
    <tbody>
      <tr>
        <td width="26%" height="30" align="center" bgcolor="#FFF5EC"><b>职位名称</b></td>
        <td width="31%" align="center" bgcolor="#FFF5EC"><strong>公司名称</strong></td>
        <td width="15%" align="center" bgcolor="#FFF5EC"><strong>工作地区</strong></td>
        <td width="15%" align="center" bgcolor="#FFF5EC"><strong>职位月薪</strong> </td>
        <td width="13%" align="center" bgcolor="#FFF5EC"><strong>最新更新</strong></td>
      </tr>
<?php
if($_GET[job_class]){
$sqls=" and job_post.job_class_id='$_GET[job_class]'";
}
if($_GET[job_smill]){
$sqls=$sqls." and job_post.job_class_id2='$_GET[job_smill]'";
}
if($_GET[job_hy]){
$sqls=$sqls." and job_post.job_hy_id='$_GET[job_hy]'";
}

if($_GET[c_provinces4]){
$sqls=$sqls." and job_post.job_pro_id='$_GET[c_provinces4]'";
}
if($_GET[c_city4]){
$sqls=$sqls." and job_post.job_city_id='$_GET[c_city4]'";
}
if($_GET[c_diqu4]){
$sqls=$sqls." and job_post.job_dq_id='$_GET[c_diqu4]'";
}

if($_GET[job_date]){
$b="-".$_GET[job_date];
$dates=date("Y-m-d",strtotime("+".$b."day"));
$sqls=$sqls." and job_post.job_addtime >='$dates'";
}
if($_GET[job_nature]){
$sqls=$sqls." and job_nature='$_GET[job_nature]'";
}
if($_GET[job_edu]){
$sqls=$sqls." and job_edu='$_GET[job_edu]'";
}
if($_GET[job_exp]){
$sqls=$sqls." and job_exp='$_GET[job_exp]'";
}
if($_GET[job_salary]){
$sqls=$sqls." and job_salary='$_GET[job_salary]'";
}
if($_GET[job_sex]){
$sqls=$sqls." and job_sex='$_GET[job_sex]'";
}


if($_GET[keyword]!="输入公司/职位关键字"&&$_GET[keyword]){
$kw=trim($_GET[keyword]);
$kw=split("( )+",$kw);
   foreach ($kw as $key=>$value){
   $sqls2.=" job_post.job_title regexp '$value' || member.m_cname regexp '$value' ||";
   }
$sqls2=" and (".substr($sqls2,0,-2).")";
$sqls=$sqls.$sqls2;
}

$j_rs=@mysql_query("select job_post.id,job_post.job_title,job_post.job_pro_id,job_post.job_pro,job_post.job_city_id,job_post.job_city,job_post.job_dq_id,job_post.job_dq,job_post.job_salary,job_post.job_addtime,member.m_user,member.m_cname from job_post inner join member on (job_post.member_id=member.id) ".$sqls." order by job_post.job_addtime desc,job_post.id desc limit ".($thepage-1)*$maxpage.",$maxpage");
$i=1;
while($j_row=@mysql_fetch_array($j_rs)){
$color=($i%2)?"#eeeeee":"#ffffff";
?>
      <tr bgcolor="<?=$color?>">
        <td height="23" align="left"><a href="/jobpost/<?=$j_row[id]?>.cfm" target="_blank"><b><?=$j_row[job_title]?></b></a></td>
        <td height="23" align="left"><a href="/jobcom/<?=$j_row[m_user]?>/" target="_blank"><?=$j_row[m_cname]?></a></td>
        <td height="23" align="center"><?php if($_GET[c_diqu4]){echo $j_row[job_dq];}else if($_GET[c_city4]){echo $j_row[job_city];}else{echo $j_row[job_pro];}?></td>
        <td height="23" align="center"><?=job_salary($j_row[job_salary])?></td>
        <td height="23" align="center"><?=date("Y-m-d",strtotime($j_row[job_addtime]))?></td>
      </tr>
<?php $i++;}
$totalrecord=@mysql_result(@mysql_query("select count(job_post.id) from job_post inner join member on (job_post.member_id=member.id) ".$sqls),0); 
$totalpage=ceil($totalrecord/$maxpage);
?>  
    </tbody>
  </table>
  <table cellspacing="0" cellpadding="0" width="99%" class="topside1">
  <form method="get" action="<?=$url?>">
    <tr>
      <td height="33" bgcolor="#FFF5EC" style="color: black" align="center"><script language="javascript">
<!--
function showPageLink(sUrl,iPage,iCount){
	var i;
	i=Math.max(1,iPage-1);
	document.write("<a href=\"" + sUrl + "1\">第一页</a> ");
	document.write("<a href=\"" + sUrl + i + "\">上一页</a> ");
	for(i=Math.max(1,iPage-8);i<iPage;i++){
		document.write("<a href=\""+sUrl + i + "\"><b>" + i + "</b></a> ");
	}
	document.write("<font color='#ff3333'><b>" + iPage + "</b></font> ");
	for(i=iPage+1;i<=Math.min(iCount,iPage+8);i++){
		document.write("<a href=\""+sUrl + i + "\"><b>" + i + "</b></a> ");
	}
	i=Math.min(iCount,iPage+1);
	if(iCount>iPage+8) document.write("<span style='font-size:8px'>···</span> ");
	document.write("<a href=\"" + sUrl + i + "\">下一页</a> ");
	document.write("<a href=\"" + sUrl + iCount + "\">最后一页</a> ");
}
showPageLink("<?=$url?>?job_class=<?=$_GET[job_class]?>&job_smill=<?=$_GET[job_smill]?>&job_hy=<?=$_GET[job_hy]?>&job_city=<?=$_GET[job_city]?>&job_date=<?=$_GET[job_date]?>&job_nature=<?=$_GET[job_nature]?>&job_edu=<?=$_GET[job_edu]?>&job_exp=<?=$_GET[job_exp]?>&job_salary=<?=$_GET[job_salary]?>&job_sex=<?=$_GET[job_sex]?>&keyword=<?=urlencode($_GET[keyword])?>&page=",<?=$thepage?>,<?=$totalpage?>);
//-->
              </script>   
   【共<font color="red"><?=$totalpage?></font>页】
   <input type="text" name="page" size="3" onKeyUp="IsDigit(this);">&nbsp;<input type="submit" value="GO"></td>
      </tr>
	  </form>
  </table>
</div>
</div>
<div class="onl"></div>

<div class="onl"></div>
</div>
<div class="onl"></div>
</div>
<div id="mian" style="clear: both;margin-top: 20px;margin-bottom: 20px;" class="side" align="center">
<script type="text/javascript">/*960*90，创建于2011-3-9*/ var cpro_id = 'u403357';</script><script src="http://cpro.baidu.com/cpro/ui/c.js" type="text/javascript"></script>
</div>
<?php include("inc/foot.php"); ?>

</BODY>
</HTML>

<script type="text/javascript">/*120*270，创建于2010-12-18*/ var cpro_id = 'u319758';</script><script src="http://cpro.baidu.com/cpro/ui/f.js" type="text/javascript"></script>